// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElemnetUI from 'element-ui'  // 1.引入组件
import 'element-ui/lib/theme-chalk/index.css'  //引入组件样式

Vue.config.productionTip = false

import axios from 'axios'

// 2. 申明使用组件
Vue.use(ElemnetUI)

axios.defaults.baseURL='http://127.0.0.1:8000'
Vue.prototype.axios = axios

router.beforeEach((to,from,next)=>{
  next()
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
